Optimal. Leaf size=45 \[ \frac {a x}{c-i d}+\frac {a \log (c \cos (e+f x)+d \sin (e+f x))}{(i c+d) f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {3612, 3611}
\begin {gather*} \frac {a \log (c \cos (e+f x)+d \sin (e+f x))}{f (d+i c)}+\frac {a x}{c-i d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3611
Rule 3612
Rubi steps
\begin {align*} \int \frac {a+i a \tan (e+f x)}{c+d \tan (e+f x)} \, dx &=\frac {a x}{c-i d}+\frac {a \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{i c+d}\\ &=\frac {a x}{c-i d}+\frac {a \log (c \cos (e+f x)+d \sin (e+f x))}{(i c+d) f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(95\) vs. \(2(45)=90\).
time = 0.57, size = 95, normalized size = 2.11 \begin {gather*} \frac {4 a f x+2 a \text {ArcTan}\left (\frac {d \cos (2 e+f x)-c \sin (2 e+f x)}{c \cos (2 e+f x)+d \sin (2 e+f x)}\right )-i a \log \left ((c \cos (e+f x)+d \sin (e+f x))^2\right )}{2 c f-2 i d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 83, normalized size = 1.84
method | result | size |
norman | \(\frac {a x}{-i d +c}+\frac {i a \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f \left (-i d +c \right )}-\frac {i a \ln \left (c +d \tan \left (f x +e \right )\right )}{f \left (-i d +c \right )}\) | \(65\) |
derivativedivides | \(\frac {a \left (\frac {\frac {\left (i c -d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (i d +c \right ) \arctan \left (\tan \left (f x +e \right )\right )}{c^{2}+d^{2}}-\frac {\left (i c -d \right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{c^{2}+d^{2}}\right )}{f}\) | \(83\) |
default | \(\frac {a \left (\frac {\frac {\left (i c -d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (i d +c \right ) \arctan \left (\tan \left (f x +e \right )\right )}{c^{2}+d^{2}}-\frac {\left (i c -d \right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{c^{2}+d^{2}}\right )}{f}\) | \(83\) |
risch | \(-\frac {2 a x}{i d -c}-\frac {2 i a x}{i c +d}-\frac {2 i a e}{f \left (i c +d \right )}+\frac {a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right )}{f \left (i c +d \right )}\) | \(87\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 93 vs. \(2 (43) = 86\).
time = 0.49, size = 93, normalized size = 2.07 \begin {gather*} \frac {\frac {2 \, {\left (a c + i \, a d\right )} {\left (f x + e\right )}}{c^{2} + d^{2}} + \frac {2 \, {\left (-i \, a c + a d\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{c^{2} + d^{2}} + \frac {{\left (i \, a c - a d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{2} + d^{2}}}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.26, size = 44, normalized size = 0.98 \begin {gather*} \frac {a \log \left (\frac {{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right )}{{\left (i \, c + d\right )} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.83, size = 44, normalized size = 0.98 \begin {gather*} - \frac {i a \log {\left (\frac {c + i d}{c e^{2 i e} - i d e^{2 i e}} + e^{2 i f x} \right )}}{f \left (c - i d\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 71, normalized size = 1.58 \begin {gather*} -\frac {\frac {i \, a \log \left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 \, d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - c\right )}{c - i \, d} - \frac {2 i \, a \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c - i \, d}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.18, size = 43, normalized size = 0.96 \begin {gather*} -\frac {a\,\mathrm {atan}\left (\frac {c\,1{}\mathrm {i}-d+d\,\mathrm {tan}\left (e+f\,x\right )\,2{}\mathrm {i}}{c-d\,1{}\mathrm {i}}\right )\,2{}\mathrm {i}}{f\,\left (d+c\,1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________